let wxPromisify = function (fn) {
    return function (obj = {}) {
        return new Promise((resolve, reject) => {
            obj.success = function (res) {
                resolve(res)
            }

            obj.fail = function (res) {
                reject(res)
            }

            fn(obj)
        })
    }
}
let idxActive = num => {
    wx.setStorageSync('active', num)
}

module.exports = {
    // formatTime: formatTime,
    idxActive:idxActive,
    wxPromisify: wxPromisify
}
